# $Id$
# Maintainer:
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Denis Martinez <deuns.martinez AT gmail.com>

pkgname=intel-tbb
pkgver=2018_20170726
_pkgver=2018
pkgrel=1
pkgdesc='High level abstract threading library'
arch=(i686 x86_64)
url='http://www.threadingbuildingblocks.org/'
license=(GPL)
depends=(gcc-libs)
source=(https://github.com/01org/tbb/archive/$_pkgver.tar.gz)
sha256sums=('94f643f1edfaccb57d64b503c7c96f00dec64e8635c054bbaa33855d72c5822d')

build() {
  cd tbb-$_pkgver
  export CXXFLAGS+=" -fno-lifetime-dse" # FS#49898
  make
}

package() {
  cd tbb-$_pkgver
  install -d "$pkgdir"/usr/lib
  install -m755 build/linux_*/*.so* "$pkgdir"/usr/lib
  install -d "$pkgdir"/usr/include
  cp -a include/tbb "$pkgdir"/usr/include
}
